package com.gestion.abs.bll.impl;

import java.util.List;

import com.gestion.abs.bll.api.gestionClasse;
import com.gestion.abs.bo.Classe;
import com.gestion.abs.bo.Etudiant;
import com.gestion.abs.dao.api.ClasseDao;
import com.gestion.abs.dao.api.DaoEtudiant;
import com.gestion.abs.exceptions.BusinessException;

public class gestionClasseImpl implements gestionClasse {
	
	private ClasseDao DaoClass;
	private DaoEtudiant etdDao;
	
	public List<Etudiant> getListEtudiantByClass(String pClasse) throws BusinessException {

		Long idClass=DaoClass.findIdClasseByNom(pClasse);
		return etdDao.getListEtdByClass(idClass);
	}

	public Long getIdClasseByName(String pName) {
		
		return DaoClass.findIdClasseByNom(pName);
	}

	public Classe ajouterClass(Classe pclass) {
		
		return DaoClass.create(pclass);
	}



	public ClasseDao getDaoClass() {
		return DaoClass;
	}

	public void setDaoClass(ClasseDao daoClass) {
		DaoClass = daoClass;
	}

	public DaoEtudiant getEtdDao() {
		return etdDao;
	}

	public void setEtdDao(DaoEtudiant etdDao) {
		this.etdDao = etdDao;
	}

	
}
